package com.whz.generic;

import lombok.experimental.UtilityClass;

/**
 * 常量类
 *
 * @author whz
 */
@UtilityClass
public final class Constants {

    /**
     * 内部用的灰度标签
     */
    public static final String GREY_FLAG = "X-INNER-COMMON-GREY-FLAGS";
    //--------------http headers----------------
    /**
     * 前端灰度http header name
     */
    public static final String GREY_HEAD_KEY = "X-COMMON-GREY-FLAG";

    /**
     * 新系统Header用户信息
     */
    public final static String X_USER_ID = "X-COMMON-USER-ID";
    public static final String X_USER_NAME = "X-COMMON-USER-NAME";
    public static final String X_COMPANY_ID = "X-COMMON-COMPANY-ID";
    public static final String X_COMPANY_NAME = "X-COMMON-COMPANY-NAME";
    public static final String X_DEPARTMENT_ID = "X-COMMON-DEPARTMENT-ID";
    public static final String X_DEPARTMENT_NAME = "X-COMMON-DEPARTMENT-NAME";
    public static final String X_PRODUCT_ID = "X-COMMON-PRODUCT-ID";
    public static final String X_PRODUCT_NAME = "X-COMMON-PRODUCT-NAME";


    /**
     * 登录token
     */
    public static final String TOKEN = "token";

    /**
     * ribbon灰度测试开关
     */
    public static final String OPTION_RIBBON_GREY_TEST = "common.web.grey-tag.enable";
    /**
     * swagger开关
     */
    public static final String OPTION_SWAGGER3 = "springfox.documentation.enabled";
    /**
     * Zuul灰度测试开关
     */
    public static final String OPTION_ZUUL_GREY_TEST = "ribbon.filter.metadata.enabled";
    /**
     * TOMCAT 优雅停机开关
     */
    public static final String OPTION_TOMCAT_GRACEFUL = "tomcat.graceful.shutdown";

    /**
     * zuul 相关常量
     */
    public static final String ZUUL_REQUEST_TIME = "zuul_request_time_key";
    public static final String OPTION_ZUUL_TIME_COST = "tomcat.graceful.shutdown";


    /**
     * trace
     */
    public static final String TRACE_ID = "traceId";
    public static final String TRACE_USER_ID = "userId";

    /**
     * 试用账户标记,gateway会透传下去
     */
    public static final String X_TEMP_USER_FLAG = "X-TEMP-USER-FLAG";
}